package com.proj.bean;

import java.time.LocalDateTime;
import java.util.List;

public class Category {
    private int id;
    private String name;
    private String imgurl;
    private int pid;
    private Category parent;
    private LocalDateTime updatetime;
    private int state;
    private List<Category> children;


    @Override
    public String toString() {
        return "Category{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", imgurl='" + imgurl + '\'' +
                ", pid=" + pid +
                ", parent=" + parent +
                ", updatetime=" + updatetime +
                ", state=" + state +
                ", children=" + children +
                '}';
    }

    public Category(int id, String name, String imgurl, int pid, Category parent, LocalDateTime updatetime, int state) {
        this.id = id;
        this.name = name;
        this.imgurl = imgurl;
        this.pid = pid;
        this.parent = parent;
        this.updatetime = updatetime;
        this.state = state;
    }

    public Category() {
    }


    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public Category getParent() {
        return parent;
    }

    public void setParent(Category parent) {
        this.parent = parent;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImgurl() {
        return imgurl;
    }

    public void setImgurl(String imgurl) {
        this.imgurl = imgurl;
    }

    public LocalDateTime getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(LocalDateTime updatetime) {
        this.updatetime = updatetime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }


    public List<Category> getChildren() {
        return children;
    }

    public void setChildren(List<Category> children) {
        this.children = children;
    }
}
